USE [TrioJFLApp]
GO

/****** Object:  StoredProcedure [dbo].[sp_Upload_SAP_ProdOrderMaterialReq]    Script Date: 09/26/2018 15:45:51 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[sp_Upload_SAP_ProdOrderMaterialReq]
@PRLotNumber NVARCHAR(50),
@Planned_order NVARCHAR(50),
@OrderNumber NVARCHAR(50),
@Order_item_number NVARCHAR(50),
@Material_Number NVARCHAR(50),
@Material_description NVARCHAR(50),
@Order_item_quantity DECIMAL(18,0),
@Routing_scrap_qty DECIMAL(18,0),
@Scrap_quantity DECIMAL(18,0),
@Qty_of_goods DECIMAL(18,0),
@Planned_opening_date NVARCHAR(50),
@Pld_order_del_date NVARCHAR(50),
@Actual_deliv_date NVARCHAR(50),
@Order_unit_of_meas  NVARCHAR(50),
@Receiver NVARCHAR(50),
@ToWhere NVARCHAR(50),
@Creator NVARCHAR(50)
AS 
BEGIN
	

INSERT INTO SAP_ProdOrderMaterialReq
(
	Oid,
	PRLotNumber,
	Planned_order,
	OrderNumber,
	Receiver,
	ToWhere,
	CreateDate,
	Creator
)
VALUES
(
	NEWID(),
    @PRLotNumber,
	@Planned_order,
	@OrderNumber,
	@Receiver,
	@ToWhere,
	GETDATE(),
	@Creator
)

END

GO


